package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author zhangyy
 * @since 2020-10-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_wx_user")
public class WxUserDo extends Model<WxUserDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @TableField("user_type")
    private Integer userType;

    @TableField("user_role_type")
    private Integer userRoleType;

    @TableField("company_id")
    private Long companyId;

    /**
     * 微信用户openid
     */
    @TableField("openid")
    private String openid;

    /**
     * 微信用户昵称
     */
    @TableField("nickname")
    private String nickname;

    @TableField("sex")
    private String sex;

    @TableField("province")
    private String province;

    @TableField("city")
    private String city;

    @TableField("country")
    private String country;

    @TableField("headimgurl")
    private String headimgurl;

    @TableField("unionid")
    private String unionid;

    @TableField("subscribe")
    private Integer subscribe;

    @TableField("session_key")
    private String sessionKey;

    @TableField("tel_phone")
    private String telPhone;

    @TableField("create_by")
    private Long createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("update_time")
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
